package com.situ.ymall.service.impl;

import com.situ.ymall.entity.Address;
import com.situ.ymall.mapper.AddressMapper;
import com.situ.ymall.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private AddressMapper addressMapper;
    @Override
    public List getByUerId(Integer UserId) {
        return addressMapper.selectByUserId(UserId);
    }

    @Override
    public Address getById(Integer addressId) {
        return addressMapper.selectByPrimaryKey(addressId);
    }
}
